from rest_framework.serializers import ModelSerializer   #导入模型类序列化器
from rest_framework import serializers  #普通序列化器
from .models import *   #导入model中的模型类




#班级序列化器
class GradeManageSer(ModelSerializer):

    class Meta:
        model = Grade
        fields = '__all__'


#课程徐丽华器
class ClassScheduleSer(ModelSerializer):
    gradeid = GradeManageSer()
    class Meta:
        model = ClassSchedule
        fields = '__all__'

